package com.longcai.piaojia.conn;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONObject;

/**
 * Created by Administrator on 2016/8/31.
 */
@HttpInlet(Conn.CHANGE_VERIFY)
public class CheckPhonePost extends BaseAsyPost<CheckPhonePost.CheckPhoneEntity> {

    public String user_id, phone, code;

    public CheckPhonePost(AsyCallBack<CheckPhoneEntity> asyCallBack) {
        super(asyCallBack);
    }

    @Override
    protected CheckPhoneEntity parser(JSONObject object) throws Exception {

        TOAST = object.optString("message");

        if(object.optInt("code")==200){

            CheckPhoneEntity checkPhoneEntity = new CheckPhoneEntity();

            checkPhoneEntity.change_token = object.optString("change_token");

            return checkPhoneEntity;

        }

        return null;
    }

    public class CheckPhoneEntity {

        public String change_token;
    }
}
